package utils

import (
	"user_service/domain"
	pb "user_service/proto"
)

// ModelToResponse  将domain.user结构转为 UserInfoResponse
func ModelToResponse(user domain.User) *pb.UserInfoResponse {
	userInfoResponse := pb.UserInfoResponse{
		Id:       user.Id,
		Password: user.Password,
		Mobile:   user.Mobile,
		Name:     user.Name,
		Email:    user.Email,
		//Role:     int32(user.Role),权限备用
	}

	return &userInfoResponse
}
